package com.imhouxy.springTemplateQuery;

import com.imhouxy.springTemplateQuery.query.AbstractQuery;
import org.springframework.stereotype.Component;

@Component
public class AccountUserQuery extends AbstractQuery<AccountUserResult> {
    public AccountUserQuery() {
        super(AccountUserResult.class);
    }

    @Override
    protected String viewSql() {
        return "select tau.account_id as accountId, tau.users_id as userId,ta.account as account,tu.c_user_name as userName\n" +
                "from t_account_users tau\n" +
                "left join t_account ta on tau.account_id = ta.id\n" +
                "left join t_userinfo tu on tau.users_id = tu.id ";
    }

}
